home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 814 b | 38 lines | [TEXT/CWIE] |
- // Justification.h
-
- #ifndef Justification_h
- #define Justification_h
-
- #ifndef Integers_h
- #include "Integers.h"
- #endif
-
- class Rectangle;
-
- class Justification
- {
- private:
- uint32 denominator;
- uint32 leadingPart;
- uint32 stretchingPart;
-
- public:
- Justification( uint32 denominator,
- uint32 leading,
- uint32 trailing );
-
- uint32 LeadingPortion( uint32 total, uint32 used ) const;
- uint32 TrailingPortion( uint32 total, uint32 used ) const;
- uint32 StretchPortion( uint32 total, uint32 used ) const;
-
- void InsetWidth( Rectangle&, uint32 newWidth ) const;
- void InsetHeight( Rectangle&, uint32 newHeight ) const;
-
- static const Justification& Leading();
- static const Justification& Trailing();
- static const Justification& Center();
- static const Justification& Full();
- };
-
- #endif
-